import java.util.Scanner;

public class Main{

    public static String fun(double n){
        return String.format("%.2f", n);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        if(n == 1){
            System.out.println(2.00);
        }
        if(n == 2){
            System.out.println(3.50);
        }
        double sum = 3.5D;
        double a1 = 1.0D;double a2 = 2.0D;//
        double b1 = 2.0D;double b2 = 3.0D;//分子
        //滚动数组 
        for(int i=2;i<n;i++){
            sum += (b1+b2) / (a1+a2);
            double tmp1 = a2;
            double tmp2 = b2;
            a2 = a1+a2;
            b2 = b1+b2;
            a1 = tmp1;
            b1 = tmp2;
        }
        System.out.println(fun(sum));
    }
}